Printing apparatus for printing image on fabric formed with pattern and printing method for printing image on fabric formed with pattern

ABSTRACT

A printing apparatus includes a pattern extracting unit for, based on a comparison between first image data representing a pattern and second image data generated by imaging a fabric transported, extracting a pattern region from the second image data, a printing image generation unit for arranging third image data representing an image to be printed overlaid on the pattern so that the third image data matches the pattern region to generate printing image data, and a printing control unit for causing a printing unit to print the printing image data on the fabric transported.

The present application is based on, and claims priority from JPApplication Serial Number 2020-196817, filed Nov. 27, 2020, thedisclosure of which is hereby incorporated by reference herein in itsentirety.

BACKGROUND 1. Technical Field

The present disclosure relates to a printing apparatus and a printingmethod.

2. Related Art

A technique has been known for searching an inspection target image fora candidate having similar characteristics to a model image obtained byimaging a good product serving as a model of the product (see JP2017-96750 A).

Here, it is assumed that, when a fabric formed with a pattern is used asa printing medium, the pattern is extracted from a captured imageobtained by imaging the fabric transported. Distortion, expansion andcontraction (hereinafter, distortion, and the like) may be generated inthe fabric being transported, and in a situation where such distortionand the like are present, a pattern needs to be extracted from acaptured image, or a picture needs to be printed so as to match apattern. However, when a size of one pattern formed in the fabric isrelatively large, extraction accuracy of the pattern from the capturedimage is easily reduced, and a shift between the picture to be printedand the pattern is easily increased, due to effects of the distortionand the like.

In addition, when the size of one pattern is large, each necessaryprocess such as extracting the pattern from the captured image orgenerating data for printing cannot be completed within a limited timefrom capturing the fabric to starting printing in some cases. In thiscase, transport velocity of the fabric is reduced or the transport istemporarily stopped in order to wait for each necessary process to end,and thus efficiency of printing is reduced.

There is a demand for a device for solving at least one of theseproblems.

SUMMARY

A printing apparatus includes a transport unit configured to transport afabric formed with a pattern in a transport direction, an imaging unitconfigured to image the fabric transported by the transport unit, aprinting unit configured to perform printing on the fabric transportedby the transport unit, a pattern extracting unit configured to, based ona comparison between first image data representing the pattern andsecond image data generated by imaging the fabric by the imaging unit,extract a pattern region corresponding to the pattern in the secondimage data, a printing image generation unit configured to arrange thirdimage data representing an image to be printed overlaid on the patternso that the third image data matches the pattern region extracted togenerate printing image data, and a printing control unit configured tocause the printing unit to print the printing image data on the fabric,wherein the pattern extracting unit compares each of a plurality ofdivided pieces of first image data obtained by dividing the first imagedata in at least one of a vertical direction and a horizontal directionwith the second image data, to extract, from the second image data, apartial pattern region corresponding to a partial pattern represented bythe divided first image data, and the printing image generation unitarranges each of a plurality of divided pieces of third image dataobtained by dividing the third image data in at least one of thevertical direction and the horizontal direction, in accordance with thepartial pattern region extracted, to generate the printing image data.

A printing method includes a transport step for transporting a fabricformed with a pattern in a transport direction, an imaging step forimaging the fabric transported, a pattern extraction step for, based ona comparison between first image data representing the pattern andsecond image data generated by imaging the fabric, extracting a patternregion corresponding to the pattern in the second image data, a printingimage generation step for arranging third image data representing animage to be printed overlaid on the pattern so that the third image datamatches the pattern region extracted to generate printing image data,and a printing step for printing the printing image data on the fabrictransported, wherein the pattern extraction step includes comparing eachof a plurality of divided pieces of first image data obtained bydividing the first image data in at least one of a vertical directionand a horizontal direction with the second image data, to extract, fromthe second image data, a partial pattern region corresponding to apartial pattern represented by the divided first image data, and theprinting image generation step includes arranging each of a plurality ofdivided pieces of third image data obtained by dividing the third imagedata in at least one of the vertical direction and the horizontaldirection, in accordance with the partial pattern region extracted, togenerate the printing image data.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a configuration of a printingapparatus in a simplified manner.

FIG. 2A is a view illustrating a configuration of a fabric to betransported and a vicinity thereof in a perspective facing downward fromabove, and FIG. 2B is a view illustrating a part of the configurationillustrated in FIG. 2A in a perspective facing downstream from upstream.

FIG. 3 is a flowchart illustrating printing processing.

FIG. 4 is a flowchart illustrating details of step S100.

FIG. 5 is a flowchart illustrating details of step S120.

FIG. 6 is a diagram for explaining step S120 by a specific example.

FIG. 7 is a diagram for explaining steps S130 and S140 by a specificexample.

FIG. 8 is a diagram illustrating an example of pattern image data andimaging data different from FIG. 6.

FIG. 9 is a diagram showing extraction accuracy of partial patternregions in a table format.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

Embodiments of the present disclosure will be described below withreference to the accompanying drawings. Note that each of the drawingsis merely illustrative for describing the embodiment. Since the drawingsare illustrative, proportions and shapes may not be precise, match eachother, or some may be omitted.

1. Apparatus Configuration:

FIG. 1 illustrates a configuration of a printing apparatus 10 accordingto the embodiment, in a simplified manner.

The printing apparatus 10 performs a printing method. The printingapparatus 10 is provided with a control unit 11, a display unit 13, anoperation receiving unit 14, an imaging unit 15, a transport unit 16, aprinting unit 17, a storage unit 18, and the like. The control unit 11is configured to include, as a processor, one or more ICs including aCPU 11 a, a ROM 11 b, a RAM 11 c, and the like, another non-volatilememory, and the like.

In the control unit 11, the processor, that is, the CPU 11 a executesarithmetic processing in accordance with one or more programs 12 storedin the ROM 11 b, the other memory, or the like, using the RAM 11 c orthe like as a work area, to control the printing apparatus 10. Thecontrol unit 11 functions, in accordance with the program 12, as apattern registration unit 12 a, a pattern extracting unit 12 b, aprinting image generation unit 12 c, a printing control unit 12 d, andthe like. Note that the processor is not limited to the single CPU, anda configuration may be adopted in which the processing is performed by ahardware circuit such as a plurality of CPUs, an ASIC, or the like, or aconfiguration may be adopted in which the CPU and the hardware circuitwork in concert to perform the processing.

The display unit 13 is a device for displaying visual information, andis configured, for example, by a liquid crystal display, an organic ELdisplay, or the like. The display unit 13 may be configured to include adisplay and a drive circuit for driving the display. The operationreceiving unit 14 is a device for receiving an operation by a user, andis realized, for example, by a physical button, a touch panel, a mouse,a keyboard, or the like. Of course, the touch panel may be realized as afunction of the display unit 13. The display unit 13 and the operationreceiving unit 14 may be part of the configuration of the printingapparatus 10, or may be peripheral devices externally coupled to theprinting apparatus 10.

The transport unit 16 is a mechanism for transporting a printing mediumunder control by the control unit 11. In the present exemplaryembodiment, a fabric is assumed, as the printing medium, formed with astereoscopic pattern by devising a weaving method of yarns and fibers,such as a jacquard woven fabric or a lace fabric. In the fabric, acertain pattern or a set of certain patterns are formed so as to bealigned repeatedly. In the following, a pattern or a set of patternswill be treated as one pattern.

The transport unit 16 includes, for example, a feeding roller forfeeding a fabric before printing, which is wound in a roll shape, todownstream of transport, a belt or roller for further transporting thefabric fed, a winding roller for winding the fabric after the printingin a roll shape and collecting the fabric, a motor for rotating eachroller or belt, or the like. In the following, upstream, and downstreamof a transport direction by the transport unit 16 are described simplyas upstream, and downstream.

The imaging unit 15 images the fabric transported by the transport unit16 under control by the control unit 11. The imaging unit 15 has aconfiguration such as a light source that irradiates the fabric, animaging element that receives reflected light from the fabric, andgenerates and outputs image data as an imaging result, or the like.

The printing unit 17 performs printing on the fabric transported by thetransport unit 16 under control by the control unit 11. The printingunit 17 is provided downstream from the imaging unit 15. The printingunit 17 performs printing on the fabric based on printing image datatransmitted from the control unit 11. The printing unit 17 can performprinting by discharging ink of a plurality of colors such as cyan,magenta, yellow, and black, for example, by an ink-jet method. Accordingto the ink-jet method, the printing unit 17 performs printing on thefabric by discharging dots of ink from a nozzle (not illustrated) basedon printing image data defining dot on or dot off of each ink for eachpixel.

The storage unit 18 is a storage method such as a non-volatile memory ora hard disk drive. The storage unit 18 may be interpreted as a part ofthe control unit 11. Additionally, the RAM 11 c may be interpreted as apart of the storage unit 18.

The printing apparatus 10 may be referred to as a recording device, animage forming device, a printer, or the like. The printing apparatus 10may be realized not only by a single independent device, but also by aplurality of devices communicatively coupled to each other via acommunication interface or a network. The printing apparatus 10configured by a plurality of devices may be referred to as a printingsystem 10.

The printing system 10 is configured to include, for example, a printerincluding the imaging unit 15, the transport unit 16, and the printingunit 17, and one or more information processing devices that function asthe control unit 11. The information processing device is, for example,a personal computer (PC), a server, a smart phone, a tablet terminal, ora device having the same degree of processing capability as thosedevices. In the printing system 10, a device serving as the control unit11 may be referred to as an image processing apparatus, a printingcontrol device, or the like. Of course, some devices that configure theprinting system 10 may be considered as an invention.

FIG. 2A illustrates a configuration of a fabric 30 to be transported anda vicinity of the fabric 30 in a perspective facing downward from above.In FIG. 2A, a depiction of a pre-formed pattern in the fabric 30 isomitted. In FIG. 2A, a transport direction of the fabric 30 by thetransport unit 16 is denoted by a reference sign D1. A reference sign 22denotes an endless belt 22 as a portion of the transport unit 16. Thefabric 30 in a state of being placed on the endless belt 22 istransported from upstream to downstream by the endless belt 22 rotating.

As illustrated in FIG. 2A, a carriage 20 is arranged above the endlessbelt 22. The carriage 20 can reciprocate along a direction D2 thatintersects the transport direction D1. Although the intersection here isorthogonal, it may be understood that orthogonal includes not onlystrict orthogonality, but also errors that occur in productmanufacturing. The carriage 20 moves along an elongated guide member 21in the direction D2. The direction D2 is also referred to as a mainscanning direction of the carriage 20 and a printing head 19. Thedirection D2 is also referred to as a width direction of the fabric 30.

The carriage 20 is equipped with the printing head 19. That is, theprinting head 19 reciprocates along the width direction D2 with thecarriage 20. Such a carriage 20 and a printing head 19 configure theprinting unit 17. Although not illustrated, a plurality of nozzles openon a lower surface opposite the endless belt 22 in the printing head 19.The printing head 19 discharges ink from the nozzle based on printingimage data while moving along the width direction D2 with the carriage20.

As illustrated in FIG. 2A, the imaging unit 15 is arranged above theendless belt 22 at a predetermined position upstream of the carriage 20and the printing head 19.

FIG. 2B illustrates a part of the configuration illustrated in FIG. 2Ain a perspective facing downstream from upstream. The imaging unit 15has a lower surface opposite the endless belt 22 as an imaging surface15 a, and images the fabric 30 above the endless belt 22 via the imagingsurface 15 a. The imaging unit 15 is, for example, a line scan typecamera in which a plurality of imaging elements are arranged insidethereof in the width direction D2. The imaging unit 15 repeats imagingon a line-by-line basis via a lens (not illustrated) and the imagingelement provided at the imaging surface 15 a. In FIG. 2B, an imagingrange in the width direction D2 by the imaging unit 15 is illustrated bydashed lines. The imaging unit 15 is capable of imaging approximately anentire range of the endless belt 22 in the width direction D2 by afunction of the lens.

The configuration of the imaging unit 15 is not limited to the exampleof FIGS. 2A and 2B. For example, a configuration may be adopted in whicha plurality of the imaging units 15 are arranged above the endless belt22 along the width direction D2, and each of the plurality of imagingunits 15 takes charge of a partial range of the entire range of theendless belt 22 in the width direction D2 and performs imaging.Alternatively, the imaging unit 15 may be a line sensor configured byarranging the plurality of imaging elements over approximately theentire range of the endless belt 22 in the width direction D2.Alternatively, similar to the printing head 19 mounted on the carriage20, the imaging unit 15 may be configured to be mounted on a carriagethat can move along the width direction D2, and to image above theendless belt 22 while moving in the width direction D2 by the carriage.

2. Printing Method:

FIG. 3 illustrates, by a flowchart, printing processing that the controlunit 11 performs in accordance with the program 12.

In step S100, the pattern registration unit 12 a of the control unit 11registers pattern image data representing a pattern formed in the fabric30 with the storage unit 18. The pattern image data corresponds to“first image data”, and step S100 corresponds to a registration step.

FIG. 4 illustrates details of step S100 by a flowchart.

In step S102, the pattern registration unit 12 a acquires base imagedata representing the pattern in the fabric 30. The fabric 30 is a wovenfabric in which, for example, one pattern designed by a designer iswoven repeatedly. Therefore, it is assumed that the base image data isimage data representing the one pattern that is generated in advanceusing predetermined software for design or drawing. The patternregistration unit 12 a is input with base image data stored in a PC fromthe PC external to the printing apparatus 10, for example, in accordancewith a user operation, and stores the input base image data in thestorage unit 18.

In step S104, the pattern registration unit 12 a acquires pre-scan data,which is image data generated by pre-scan of the fabric 30. The pre-scanmeans reading or imaging that is performed before imaging of the fabric30 to be started in step S110 described below. For example, a usercauses a scanner external to the printing apparatus 10 to scan thefabric 30 in advance. Then, the pattern registration unit 12 a is inputwith image data generated by this scan from the scanner, and stores theimage data as pre-scan data in the storage unit 18.

Alternatively, the pre-scan may be performed by the imaging unit 15. Forexample, the control unit 11 causes the transport unit 16 to starttransporting the fabric 30, and causes the transport of the fabric 30 tostop at timing at which a tip of the fabric 30 reaches a position, whichis downstream from the imaging unit 15 by a predetermined distance. Thetip of the fabric 30 is an end portion facing downstream of the fabric30. The imaging unit 15 images the fabric 30 passing by transportingunder the imaging unit 15, and the pattern registration unit 12 a isinput with image data generated by this imaging from the imaging unit 15and stores the image data as pre-scan data in the storage unit 18.

In step S106, the pattern registration unit 12 a compares the base imagedata acquired in step S102 with the pre-scan data acquired in step S104to extract, in the pre-scan data, a pattern region corresponding to onepattern of the fabric 30. At this time, the pattern registration unit 12a uses an image recognition technology to extract an image region withhigher similarity with the base image data in the pre-scan data, anduses this image region as the pattern region.

Then, in step S108, the pattern registration unit 12 a stores image datacorresponding to the pattern region extracted in step S106 in thestorage unit 18 as pattern image data. As a result, the pattern imagedata is registered.

According to the description according to FIG. 4, the pattern image datacan be said to be at least a part of the pre-scan data.

However, the pattern registration unit 12 a may simplify a part of stepS100 by registering base image data itself with the storage unit 18 aspattern image data.

Furthermore, in step S109, the pattern registration unit 12 a dividesthe pattern image data in at least one of a vertical direction and ahorizontal direction, and registers N divided pieces of pattern imagedata with the storage unit 18. N is an integer of 2 or greater. Thedivided pattern image data corresponds to “divided first image data”. Inthis way, step S100 is completed.

In the present exemplary embodiment, an orientation of each image data,such as pattern image data, imaging data, and printing image datahandled by the control unit 11 will also be described corresponding tothe transport direction D1 and the width direction D2. For example, itcan be interpreted that the transport direction D1 is the verticaldirection, and the width direction D2 is the horizontal direction. Forexample, when the pattern registration unit 12 a divides the patternimage data into three equal portions in the vertical direction and threeequal portions in the horizontal direction, then N=3×3, thus the patternimage data can be divided into nine divided pieces of pattern imagedata, and the divided pattern image data can be stored in the storageunit 18.

The number of divisions of the pattern image data in each of thevertical direction and the horizontal direction is predetermined.Alternatively, the pattern registration unit 12 a may acquire the numberof divisions in each of the vertical direction and the horizontaldirection through an operation of the operation receiving unit 14 by theuser, and perform step S109. Note that, instead of storing the N dividedpieces of pattern image data in step S109, the pattern registration unit12 a may store position information of the N divided pieces of patternimage data in the pattern image data.

Returning to the description of FIG. 3.

In step S110, the control unit 11 causes the imaging unit 15 to startimaging with the fabric 30 as a target that the transport unit 16transports at predetermined velocity. That is, in step S110, a“transport step” of the fabric 30 is started. In addition, an “imagingstep” is started by step S110. Image data on a line-by-line basisgenerated by the imaging of the fabric 30 by the imaging unit 15 issequentially output to the control unit 11. The control unit 11 acquirestwo-dimensional imaging data, by sequentially storing the image data ona line-by-line basis from the imaging unit 15. The imaging datacorresponds to “second image data”.

In step S120, the pattern extracting unit 12 b, based on a comparisonbetween the pattern image data registered in step S100 and the imagingdata generated by the imaging in step S110, extracts a pattern regioncorresponding to the pattern in the fabric 30 in the imaging data. Inthe imaging data, a plurality of the patterns are represented side byside. Step S120 corresponds to a “pattern extraction step”.

FIG. 5 illustrates details of step S120 by a flowchart.

In step S121, the pattern extracting unit 12 b resets a value nrepresenting a number of the divided pattern image data so that n=0. Inthe present exemplary embodiment, description will be given by assigningnumbers from 1 to N to the N divided pieces of pattern image dataregistered in step S109, respectively.

In step S122, the pattern extracting unit 12 b increments n. That is, 1is added to n, which is current, to update n.

In step S123, the pattern extracting unit 12 b sets the n-th dividedpattern image data to a reference of extraction.

In step S124, the pattern extracting unit 12 b compares the dividedpattern image data set as the reference of extraction with the imagingdata, to extract, from the imaging data, a partial pattern regioncorresponding to a partial pattern represented by the divided patternimage data as the reference.

It is sufficient that the pattern extracting unit 12 b uses an imagerecognition technology to extract, as a partial pattern region, an imageregion having a degree of similarity with the divided pattern image datathat is higher than a predetermined level. Specifically, the patternextracting unit 12 b extracts an edge of an image in the divided patternimage data, and similarly extracts an edge of an image in the imagingdata. Then, an edge distribution in the divided pattern image data isrepeatedly compared with an edge distribution in the imaging data, whilea position is shifted, and while the divided pattern image data isdeformed, and a region in which a degree of match between the edgedistributions is highly evaluated above a predetermined level isextracted as one partial pattern region. With such a process, thepattern extracting unit 12 b extracts the partial pattern region frominside the imaging data. Note that, as in the process in step S124, instep S106 described above, the pattern registration unit 12 a canextract a pattern region in pre-scan data according to a degree of matchof edge distributions between images to be compared.

In step S125, the pattern extracting unit 12 b outputs information ofthe partial pattern region extracted by step S124 to the printing imagegeneration unit 12 c for step S130 and subsequent steps. Here, when thewidth direction D2 is taken as an X-axis, and the transport direction D1is taken as a Y-axis, coordinates of imaging data are defined in atwo-dimensional plane according to the orthogonal X- and Y-axes. Theprocess of extracting a partial pattern region from imaging data is aprocess of identifying coordinates of the partial pattern region in theimaging data. The coordinates of the partial pattern region are, forexample, center coordinates or coordinates of four corners of thepartial pattern region. Accordingly, in step S125, it is sufficient thatthe pattern extracting unit 12 b outputs the information of thecoordinates of the partial pattern region.

In step S126, the pattern extracting unit 12 b determines whether N=n ornot, and determines “Yes” when N=n, and ends step S120. N=n at the endof step S125 means that all of the N divided pieces of pattern imagedata constituting the pattern image data have been set to the referenceof extraction in step S123, and step S124 has been completed. On theother hand, when N>n, the pattern extracting unit 12 b repeats step S122and the subsequent steps after determining “No” in step S126.

According to the example of FIG. 5, the pattern extracting unit 12 brepeats step S124 N times while setting the first to N-th dividedpattern image data to the reference of extraction sequentially one byone according to the flow. However, depending on processing capabilityof the CPU 11 a or the like, the pattern extracting unit 12 b mayperform extraction of the N types of partial pattern regions performedwith the first to N-th divided pattern image data each being thereference of extraction, in parallel in step S120.

A specific example of step S120 will be described with reference to FIG.6. A reference sign 40 denotes pattern image data 40. The pattern imagedata 40 is image data that represents a pattern designed with a petalshape as a motif. Of course, such a pattern may be more complex. Thepattern image data 40 is divided into four divided pieces of patternimage data 40 a, 40 b, 40 c, and 40 d, by being divided into two equalportions in the transport direction D1, and divided into two equalportions in the width direction D2. That is, in the example of FIG. 6,N=4.

In addition, FIG. 6 illustrates a part of imaging data 42. In theimaging data 42, a pattern similar to the pattern represented by thepattern image data 40 is repeatedly represented along each of thetransport direction D1 and the width direction D2. Each rectangleindicated by solid lines in the imaging data 42 is a partial patternregion 41 a corresponding to a partial pattern represented by thedivided pattern image data 40 a. In other words, by setting the dividedpattern image data 40 a to a reference of extraction, the patternextracting unit 12 b extracts the partial pattern region 41 a similar tothe divided pattern image data 40 a from a plurality of locations in theimaging data 42.

Similarly, each rectangle indicated by dashed lines in the imaging data42 is a partial pattern region 41 b corresponding to a partial patternrepresented by the divided pattern image data 40 b. By setting thedivided pattern image data 40 b to a reference of extraction, thepattern extracting unit 12 b extracts the partial pattern region 41 bsimilar to the divided pattern image data 40 b from a plurality oflocations in the imaging data 42. Also, a rectangle indicated bydot-dash lines in the imaging data 42 is one of partial pattern regions41 c corresponding to the divided pattern image data 40 c, andsimilarly, a rectangle indicated by two-dot chain lines in the imagingdata 42 is one of partial pattern regions 41 d corresponding to thedivided pattern image data 40 d. Of course, the partial pattern region41 c and the partial pattern region 41 d are also extracted from aplurality of locations in the imaging data 42.

A set of the partial pattern regions 41 a, 41 b, 41 c, and 41 d form onepattern region 41. In this manner, the process of comparing each of theplurality of divided pieces of pattern image data 40 a, 40 b, 40 c, and40 d constituting the pattern image data 40 with the imaging data 42 toextract the partial pattern regions 41 a, 41 b, 41 c, and 41 d by thepattern extracting unit 12 b corresponds to a process of extracting thepattern regions 41 from the imaging data 42.

Returning to the description of FIG. 3.

In step S130, the printing image generation unit 12 c corrects coloredimage data that represents an image to be printed overlaid on thepattern in the fabric 30 so as to match a shape of the pattern regionextracted in step S120. The colored image data corresponds to “thirdimage data”. The colored image data is pre-generated color image datarepresenting a color to color one pattern, or a print range of a color.The colored image data is stored in advance in the storage unit 18, forexample. Alternatively, the control unit 11 is input with colored imagedata stored in a PC from the PC external to the printing apparatus 10,for example, in accordance with a user operation, and stores the inputcolored image data in the storage unit 18.

A shape of the colored image data is an ideal shape of a pattern regionhaving one pattern, for example, a rectangle. On the other hand, a shapeof each pattern region extracted from the imaging data in step S120 isbasically a square, but does not necessarily match the shape of thecolored image data. This is because distortion, expansion andcontraction (hereinafter, distortion, and the like) may be generated inthe fabric 30 being transported. Although not particularly depicted inFIG. 6, each of the partial pattern regions 41 a, 41 b, 41 c, and 41 dthat constitute each of the pattern regions 41 extracted from theimaging data 42 may have a shape that is distorted, expanded, orcontracted due to distortion and the like in the fabric 30.

As such, the printing image generation unit 12 c deforms each of theplurality of divided pieces of colored image data obtained by dividingthe colored image data in at least one of the vertical direction and thehorizontal direction so as to match an individual shape of the partialpattern region extracted in step S120. The divided colored image datacorresponds to “divided third image data”. The printing image generationunit 12 c divides the colored image data to acquire N divided pieces ofcolored image data, by the same division aspect for dividing the patternimage data to acquire the N divided pieces of pattern image data in stepS109 by the pattern registration unit 12 a. For example, when thepattern registration unit 12 a divided the pattern image data into threeequal portions in the vertical direction and into three equal portionsin the horizontal direction to acquire the nine divided pieces ofpattern image data, the printing image generation unit 12 c similarlydivides the colored image data into three equal portions in the verticaldirection and into three equal portions in the horizontal direction toacquire nine divided pieces of colored image data.

Then, the printing image generation unit 12 c deforms one divided pieceof colored image data so as to match a shape of a partial pattern regionin which a position in the pattern region corresponds to a position ofthe divided colored image data in the colored image data. As adeformation method, for example, an affine transformation includingexpansion, contraction, rotation, shear, and the like of an image, oranother deformation method is used. Such deformation is a correction bystep S130. Note that, depending on the shape of the pattern region, thecorrection in step S130 is not necessary as a result in some cases.

In step S140, the printing image generation unit 12 c arranges theplurality of divided pieces of colored image data after step S130 so asto correspond to an array of the partial pattern regions and the patternregions in the imaging data to generate printing image data. Theprinting image data is image data in which the plurality of dividedpieces of colored image data after step S130 are combined, and is animage printed on a region of the fabric 30 as a target of imaging. Suchsteps S130 and S140 correspond to a “printing image generation step” ofarranging the third image data so as to match the pattern regionextracted to generate the printing image data.

Assuming the description for FIG. 6, a specific example of steps S130and S140 will be described with reference to FIG. 7. A reference sign 50denotes colored image data 50. The colored image data 50 is color imagedata representing colors to be colored overlaid on a pattern designedwith a petal as a motif. The colored image data 50 may be interpreted asan image having the same or substantially the same size as the patternimage data 40 vertically and horizontally. Similar to the pattern imagedata 40, the colored image data 50 is divided into two equal portions inthe transport direction D1 and divided into two equal portions in thewidth direction D2, to be divided into four divided pieces of coloredimage data 50 a, 50 b, 50 c, and 50 d.

A reference sign 51 a denotes divided colored image data 51 a aftercorrecting the divided colored image data 50 a so as to match a shape ofthe partial pattern region 41 a constituting one certain pattern region41. Similarly, a reference sign 51 b denotes divided colored image data51 b after correcting the divided colored image data 50 b so as to matcha shape of the partial pattern region 41 b constituting the one patternregion 41. A reference sign 51 c is divided colored image data 51 cafter correcting the divided colored image data 50 c so as to match ashape of the partial pattern region 41 c constituting the one patternregion 41. A reference sign 51 d is divided colored image data 51 dafter correcting the divided colored image data 50 d so as to match ashape of the partial pattern region 41 d constituting the one patternregion 41.

In FIG. 7, boundaries of the divided colored image data are partiallyindicated by broken lines. Additionally, distortion and the like of apattern caused by distortion and the like of the fabric 30 that is notdepicted in FIG. 6 is represented in FIG. 7. It is sufficient that instep S130, the printing image generation unit 12 c repeatedly performsthe correction of the divided colored image data 50 a, 50 b, 50 c, and50 d for each of the pattern regions 41 constituted by the partialpattern regions 41 a, 41 b, 41 c, and 41 d extracted in step S120. Then,the divided colored image data 51 a, 51 b, 51 c, and 51 d after such acorrection combined according to a positional relationship among thepartial pattern regions 41 a, 41 b, 41 c, and 41 d in the pattern region41, and an array of the pattern regions 41 in the imaging data 42, formprinting image data 52.

As indicated by a dashed arrow in FIG. 3, the control unit 11, afterstarting imaging of the fabric 30 in step S110, repeats steps S120 toS140 in accordance with the imaging data obtained sequentially from theimaging unit 15. In other words, the control unit 11 performs step S120using imaging data of a predetermined size obtained sequentially fromthe imaging unit 15 as a target, and performs steps S130 and S140 inresponse to a result of step S120. The printing image data 52illustrated in FIG. 7 is the printing image data obtained as a result ofone cycle of such steps S120 to S140.

In step S150, the printing control unit 12 d starts printing of theprinting image data generated in step S140 on the fabric 30. In otherwords, a “printing step” is started by step S150. The printing imagegeneration unit 12 c sequentially generates printing image data byrepeating step S140, and outputs the printing image data sequentially tothe printing control unit 12 d in an order of generation. The printingcontrol unit 12 d appropriately performs various types of necessaryprocessing such as so-called color conversion processing and halftoneprocessing on the printing image data acquired from the printing imagegeneration unit 12 c, to convert the printing image data into printingimage data in a format used by the printing unit 17 for printing. Theprinting control unit 12 d may temporarily accumulate the printing imagedata after such conversion in a buffer.

Then, the printing control unit 12 d transfers the printing image dataafter the above conversion to the printing unit 17, and causes theprinting unit 17 to start printing by movement of the carriage 20 andink discharge from the printing head 19 based on the printing image dataat predetermined timing at which a position of the fabric 30 for whichimaging is started by step S110 reaches below the printing head 19. As aresult, color images represented by the individual colored image dataconstituting the printing image data are printed overlaid on the patternin a shape that matches the individual pattern in the fabric 30.

The transport unit 16 is provided with an encoder that detects an amountof rotation of rollers and belts rotating for transport. The printingcontrol unit 12 d computes a transport distance of the fabric 30 inaccordance with a detection signal from the encoder. Accordingly, theprinting control unit 12 d can grasp a current position in the transportdirection D1 of the fabric 30 for which imaging is started by step S110,and can cause the printing unit 17 to start printing on the fabric 30 attiming at which the position reaches below the printing head 19.

After printing is started in step S150, the control unit 11 determineswhether to end the printing or not (step S160). When ending theprinting, the control unit 11 determines “Yes” and proceeds to an endprocess in step S170. The control unit 11 determines to end the printingwhen, for example, the end of printing is instructed by a user, or whenthe transport of the fabric 30 by a predetermined length is completed.

In the end process in step S170, the control unit 11 stops imaging ofthe fabric 30 by the imaging unit 15. In addition, the control unit 11stops driving the transport unit 16 and the printing unit 17 aftercausing the printing unit 17 to perform printing based on the printingimage data generated in one cycle of the last steps S120 to S140, andends the flowchart in FIG. 3. Of course, the control unit 11 may stopthe transport unit 16 after controlling a necessary process such ascollection of the fabric 30 by a winding roller.

3. Selection of Partial Pattern Regions Based on Accuracy of Extraction:

As described above, the pattern extracting unit 12 b extracts a partialpattern region by a comparison with imaging data in units of dividedpattern image data. In this case, when a plurality of similar partialpatterns are included in one pattern, and when one certain divided pieceof pattern image data is set to a reference of extraction in step S123,and step S124 is performed, there is a possibility that any of thepartial patterns at the plurality of locations is extracted as a partialpattern region. However, from one pattern, a partial pattern region atone location is to be extracted originally based on one divided piece ofpattern image data. In view of such a situation, as described below, thepattern extracting unit 12 b may calculate accuracy of extraction of thepartial pattern region in step S120, and select information of thepartial pattern region required for processes in step S130 andsubsequent steps.

FIG. 8 illustrates an example of pattern image data and imaging datadifferent from FIG. 6. A reference sign 43 denotes pattern image data 43representing one pattern. The pattern image data 43 is divided into twoequal portions in the transport direction D1, and is divided into threeequal portions in the width direction D2, to be divided into six dividedpieces of pattern image data 43 a, 43 b, 43 c, 43 d, 43 e, and 43 f.That is, in the example of FIG. 8, N=6.

Additionally, in FIG. 8, partial patterns represented by the dividedpattern image data 43 a, 43 b, 43 c, 43 d, 43 e, and 43 f respectivelyare simplified, and drawn by using a square pattern “□”, a circlepattern “◯”, or a star pattern “⋆”. In this way, for example, thepartial pattern represented by the divided pattern image data 43 a, andthe partial pattern represented by the divided pattern image data 43 eare similar to each other. In addition, the partial pattern representedby the divided pattern image data 43 b and the partial patternrepresented by the divided pattern image data 43 f are similar to eachother. Additionally, the partial pattern represented by the dividedpattern image data 43 c and the partial pattern represented by thedivided pattern image data 43 d are similar to each other.

FIG. 8 illustrates a part of the imaging data 45. In the imaging data45, a pattern similar to the pattern represented by the pattern imagedata 43 is repeatedly represented along each of the transport directionD1 and the width direction D2. Rectangles indicated by broken lines inthe imaging data 45 are partial pattern regions 44 a, 44 b, 44 c, 44 d,44 e, 44 f, 44 g, 44 h, 44 i, 44 j, 44 k, 44 l, 44 m, 44 n, 44 o, 44 p,44 q, 44 r, 44 s, 44 t, 44 u, 44 v, 44 w, 44 x, and the like, extractedby step S124 in FIG. 5.

When step S124 is performed by setting the divided pattern image data 43a to a reference of extraction in step S123, the pattern extracting unit12 b extracts the partial pattern regions 44 a, 44 d, 44 h, 44 k, 44 m,44 p, 44 t, and 44 w, according to the example in FIG. 8. However, inthese partial pattern regions 44 a, 44 d, 44 h, 44 k, 44 m, 44 p, 44 t,and 44 w, a partial pattern region to be extracted when the dividedpattern image data 43 e instead of the divided pattern image data 43 ais set to the reference of extraction is also included. Therefore, thepattern extracting unit 12 b calculates accuracy of extraction for eachpartial pattern region extracted in step S124, based on a comparisonbetween a positional relationship between this partial pattern regionand other partial pattern regions extracted in a periphery, and apositional relationship among a plurality of divided pieces of patternimage data in the pattern image data. In the following, the accuracy ofextraction is also referred to as “extraction accuracy”. Each of aplurality of partial pattern regions extracted from a plurality ofpositions of imaging data corresponding to a partial pattern representedby one certain divided piece of pattern image data corresponds to “firstpartial pattern region”.

Here, the case is used as an example in which when the divided patternimage data 43 a is set to the reference of extraction, the partialpattern region 44 a and the partial pattern region 44 h each being thesquare pattern “□” have been extracted from the imaging data 45, and acalculation method of extraction accuracy of each of the partial patternregions 44 a and 44 h will be described. In this case, each of thepartial pattern regions 44 a and 44 h is the first partial patternregion. Note that, the square pattern “□” is a partial pattern regionextracted when the divided pattern image data 43 a or the dividedpattern image data 43 e is set to the reference of extraction. In FIG.8, for convenience of explanation, the width direction D2 is taken as anX-axis+direction, a reverse direction of the width direction D2 is takenas an X-axis−direction, an upstream direction in the transport directionD1 is taken as a Y-axis+direction, and a downstream direction in thetransport direction D1 is taken as a Y axis−direction.

First, the extraction accuracy of the partial pattern region 44 a iscalculated. With reference to a positional relationship among thedivided pattern image data 43 a and the divided pattern image data 43 b,43 c, 43 d, 43 e, and 43 f in the pattern image data 43, a partialpattern region next to the partial pattern region 44 a in theX-axis+direction is to correspond to the circle pattern “◯” in theimaging data 45. The circle pattern “◯” is a partial pattern regionextracted when the divided pattern image data 43 b or the dividedpattern image data 43 f is set to the reference of extraction. In theimaging data 45, the partial pattern region 44 b being the circlepattern “◯” is extracted next to the partial pattern region 44 a in theX-axis+direction, thus the pattern extracting unit 12 b sets theextraction accuracy of the partial pattern region 44 a to +1 inaccordance with this fact.

Similarly, with reference to the positional relationship among thedivided pattern image data 43 a and the divided pattern image data 43 b,43 c, 43 d, 43 e, and 43 f, a partial pattern region two ahead from thepartial pattern region 44 a in the X-axis+direction (next to the next)is to correspond to the star pattern “⋆”. The star pattern “⋆” is apartial pattern region extracted when the divided pattern image data 43c or the divided pattern image data 43 d is set to the reference ofextraction. In the imaging data 45, the partial pattern region 44 cbeing the star pattern “⋆” is extracted two ahead from the partialpattern region 44 a in the X-axis+direction, thus the pattern extractingunit 12 b adds +1 to the extraction accuracy of the partial patternregion 44 a.

Furthermore, a partial pattern region next to the partial pattern region44 a in the Y-axis+direction is to correspond to the star pattern “⋆”,and the partial pattern region 44 g being the star pattern “⋆” isextracted next to the partial pattern region 44 a in theY-axis+direction. Thus, the pattern extracting unit 12 b adds +1 to theextraction accuracy of the partial pattern region 44 a.

In addition, a partial pattern region one ahead in the X-axis+directionand one ahead in the Y-axis+direction from the partial pattern region 44a is to correspond to the square pattern “□”, and the partial patternregion 44 h being the square pattern “□” is extracted one ahead in theX-axis+direction and one ahead in the Y-axis+direction from the partialpattern region 44 a. Thus, the pattern extracting unit 12 b adds +1 tothe extraction accuracy of the partial pattern region 44 a.

In addition, a partial pattern region two ahead in the X-axis+directionand one ahead in the Y-axis+direction from the partial pattern region 44a is to correspond to the circle pattern “◯”, and the partial patternregion 44 i being the circle pattern “◯” is extracted two ahead in theX-axis+direction and one ahead in the Y-axis+direction from the partialpattern region 44 a. Thus, the pattern extracting unit 12 b adds +1 tothe extraction accuracy of the partial pattern region 44 a.

As a result of adding to the extraction accuracy in this way, thepattern extracting unit 12 b calculates the extraction accuracy as “+5”for the partial pattern region 44 a extracted from the imaging data 45with the divided pattern image data 43 a as the reference of extraction.Note that, in the situation in which the pattern image data 43 isdivided into six as illustrated in FIG. 8, the extraction accuracy “+5”refers to the highest point of the accuracy of extraction.

Similarly, extraction accuracy of the partial pattern region 44 h iscalculated. As described above, with reference to the positionalrelationship among the divided pattern image data 43 a and the dividedpattern image data 43 b, 43 c, 43 d, 43 e, and 43 f in the pattern imagedata 43, a partial pattern region next to the partial pattern region 44h in the X-axis+direction is to correspond to the circle pattern “◯” inthe imaging data 45, and the partial pattern region 44 i being thecircle pattern “◯” is extracted next to the partial pattern region 44 hin the X-axis+direction. Therefore, the pattern extracting unit 12 bsets the extraction accuracy of the partial pattern region 44 h to +1.

In addition, the partial pattern region 44 j being the star pattern “⋆”is extracted two ahead in the X-axis+direction from the partial patternregion 44 h. Thus, the pattern extracting unit 12 b adds +1 toextraction accuracy of the partial pattern region 44 h.

However, although a partial pattern region next to the partial patternregion 44 h in the Y-axis+direction is to correspond to the star pattern“⋆”, the partial pattern region 44 n being the circle pattern “◯” isextracted next to the partial pattern region 44 h in theY-axis+direction. Based on this fact, the pattern extracting unit 12 bdoes not add points to the extraction accuracy of the partial patternregion 44 h.

In addition, although a partial pattern region one ahead in theX-axis+direction and one ahead in the Y-axis+direction from the partialpattern region 44 h is to correspond to the square pattern “□”, thepartial pattern region 44 o being the star pattern “⋆” is extracted oneahead in the X-axis+direction and one ahead in the Y-axis+direction fromthe partial pattern region 44 h. Based on this fact, the patternextracting unit 12 b does not add points to the extraction accuracy ofthe partial pattern region 44 h.

In addition, although a partial pattern region two ahead in theX-axis+direction and one ahead in the Y-axis+direction from the partialpattern region 44 h is to correspond to the circle pattern “◯”, thepartial pattern region 44 p being the square pattern “□” is extractedtwo ahead in the X-axis+direction and one ahead in the Y-axis+directionfrom the partial pattern region 44 h. Based on this fact, the patternextracting unit 12 b does not add points to the extraction accuracy ofthe partial pattern region 44 h.

As a result of adding to the extraction accuracy in this way, thepattern extracting unit 12 b calculates the extraction accuracy as “+2”for the partial pattern region 44 h extracted from the imaging data 45with the divided pattern image data 43 a as the reference of extraction.

That is, even when the partial pattern region 44 a and the partialpattern region 44 h can be extracted from the imaging data 45 with thedivided pattern image data 43 a as the reference of extraction, due to adifference in extraction accuracy, it is understood that the partialpattern region 44 a is a correct extraction result, and the partialpattern region 44 h is an erroneous extraction result, as an extractionresult based on the divided pattern image data 43 a.

Next, a case is used as an example in which when the divided patternimage data 43 b is set to a reference of extraction, the partial patternregion 44 b and the partial pattern region 44 i each being the circlepattern “◯” have been extracted from the imaging data 45, and acalculation method of extraction accuracy of each of the partial patternregions 44 b and 44 i will be described.

First, the extraction accuracy of the partial pattern region 44 b iscalculated. With reference to a positional relationship among thedivided pattern image data 43 b and the divided pattern image data 43 a,43 c, 43 d, 43 e, and 43 f in the pattern image data 43, a partialpattern region next to the partial pattern region 44 b in theX-axis−direction in the imaging data 45 is to correspond to the squarepattern “□”, and the partial pattern region 44 a being the squarepattern “□” is extracted next to the partial pattern region 44 b in theX-axis−direction. Therefore, the pattern extracting unit 12 b sets theextraction accuracy of the partial pattern region 44 b to +1. Inaddition, the partial pattern region 44 c being the star pattern “⋆” isextracted next to the partial pattern region 44 b in theX-axis+direction, thus the pattern extracting unit 12 b adds +1 to theextraction accuracy of the partial pattern region 44 b. In addition, thepartial pattern region 44 g being the star pattern “⋆” is extracted oneahead in the X-axis−direction and one ahead in the Y-axis+direction fromthe partial pattern region 44 b, thus the pattern extracting unit 12 badds +1 to the extraction accuracy of the partial pattern region 44 b.In addition, the partial pattern region 44 h being the square pattern“□” is extracted next to the partial pattern region 44 b in theY-axis+direction, thus the pattern extracting unit 12 b adds +1 to theextraction accuracy of the partial pattern region 44 b. In addition, thepartial pattern region 44 i being the circle pattern “◯” is extractedone ahead in the X-axis+direction and one ahead in the Y-axis+directionfrom the partial pattern region 44 b, thus the pattern extracting unit12 b adds +1 to the extraction accuracy of the partial pattern region 44b. Accordingly, the pattern extracting unit 12 b calculates theextraction accuracy as “+5” for the partial pattern region 44 bextracted from the imaging data 45 with the divided pattern image data43 b as the reference of extraction.

Similarly, the extraction accuracy of the partial pattern region 44 i iscalculated. In the imaging data 45, the partial pattern region 44 hbeing the square pattern “□” is extracted next to the partial patternregion 44 i in the X axis−direction. Therefore, the pattern extractingunit 12 b sets the extraction accuracy of the partial pattern region 44i to +1. In addition, the partial pattern region 44 j being the starpattern “⋆” is extracted next to the partial pattern region 44 i in theX-axis+direction, thus the pattern extracting unit 12 b adds +1 to theextraction accuracy of the partial pattern region 44 i. However, thepartial pattern region 44 n one ahead in the X-axis−direction and oneahead in the Y-axis+direction from the partial pattern region 44 i isnot the star pattern “⋆”, the pattern extracting unit 12 b does not addpoints to the extraction accuracy of the partial pattern region 44 i,based on this fact. Furthermore, because the partial pattern region 44 onext to the partial pattern region 44 i in the Y-axis+direction is notthe square pattern “□”, the pattern extracting unit 12 b does not addpoints to the extraction accuracy of the partial pattern region 44 i,based on this fact. Further, the partial pattern region 44 p one aheadin the X-axis+direction and one ahead in the Y-axis+direction from thepartial pattern region 44 i is not the circle pattern “◯”, the patternextracting unit 12 b does not add points to the extraction accuracy ofthe partial pattern region 44 i, based on this fact. Accordingly, thepattern extracting unit 12 b calculates the extraction accuracy as “+2”for the partial pattern region 44 i extracted from the imaging data 45with the divided pattern image data 43 b as the reference of extraction.

In this way, even when the partial pattern region 44 b and the partialpattern region 44 i can be extracted from the imaging data 45 with thedivided pattern image data 43 b as the reference of extraction, it isunderstood that, due to a difference in extraction accuracy, the partialpattern region 44 b is a correct extraction result, and the partialpattern region 44 i is an erroneous extraction result, as an extractionresult based on the divided pattern image data 43 b.

FIG. 9 shows, in a table format, extraction accuracy for eachcombination of the divided pattern image data as the reference ofextraction, and partial pattern region extracted from the imaging databased on the divided pattern image data as the reference of extraction.The pattern extracting unit 12 b calculates, for each partial patternregion extracted, extraction accuracy from a positional relationshipwith surrounding partial pattern regions as described above. Accordingto FIG. 9, for example, the partial pattern region 44 a may be extractedin both a case with the divided pattern image data 43 a as a referenceof extraction, and a case with the divided pattern image data 43 e as areference of extraction. However, the extraction accuracy with thedivided pattern image data 43 a as the reference of extraction is “+5”,and the extraction accuracy with the divided pattern image data 43 e asthe reference of extraction is “+1”, thus it is understood that thepartial pattern region 44 a extracted with the divided pattern imagedata 43 a as the reference is a correct extraction result, and thepartial pattern region 44 a extracted with the divided pattern imagedata 43 e as the reference is an erroneous extraction result.

It is sufficient that the pattern extracting unit 12 b performscalculation of such extraction accuracy at the timing of step S125, and,for example, when the extraction accuracy as illustrated in FIG. 9 isobtained, the pattern extracting unit 12 b selects a partial patternregion having extraction accuracy of “+5”, and outputs information ofthe selected partial pattern region to the printing image generationunit 12 c as an extraction result. Alternatively, the pattern extractingunit 12 b selects, out of the partial pattern regions extracted in stepS124, a partial pattern region for which calculated extraction accuracyis equal to or greater than a predetermined threshold value, and outputsinformation of the selected partial pattern region to the printing imagegeneration unit 12 c as an extraction result. In other words, thepattern extracting unit 12 b provides an extraction result of a firstpartial pattern region having relatively high extraction accuracy amongfirst partial pattern regions at a plurality of positions, to theprinting image generation unit 12 c for generation of printing imagedata.

As will be understood from the description above, calculation ofextraction accuracy is performed in a state in which extraction of aplurality of partial pattern regions from a certain area of imaging datais possible, since it is necessary to refer to a positional relationshipamong the plurality of partial pattern regions extracted. As such, it issufficient that the pattern extracting unit 12 b repeats steps S122,S123, and S124 a plurality of times, and for example as illustrated inFIG. 8, at timing after extraction of a partial pattern region of theimaging data 45 using consecutive predetermined sized regions as atarget has ended, calculates extraction accuracy for each partialpattern region, and selects a partial pattern region based on theextraction accuracy, in step S125.

The calculation of the extraction accuracy is possible even in asituation in which a group having a plurality of partial pattern regionscorresponding to one pattern image data cannot be extracted. It isassumed that, due to velocity at which the imaging data 45 is generated,the pattern extracting unit 12 b has not acquire a part of the imagingdata 45 having the partial pattern regions 44 s, 44 t, 44 u, 44 v, 44 w,and 44 x, at the time of step S120. Even in such a case, the patternextracting unit 12 b calculates, for example, extraction accuracy of thepartial pattern region 44 m from a relationship with the partial patternregion 44 n or the partial pattern region 44 o.

Specifically, it is sufficient that the pattern extracting unit 12 buses, as a parameter, the number of other partial pattern regionsreferred to in order to calculate the extraction accuracy of the partialpattern region 44 m, and uses, as extraction accuracy, a ratio of thenumber of the partial pattern regions for which a positionalrelationship with the partial pattern region 44 m coincides with apositional relationship of divided pattern image data in the patternimage data 43. That is, for the partial pattern regions 44 m extractedwith the divided pattern image data 43 a as the reference, thepositional relationship with the partial pattern region 44 n and thepartial pattern region 44 o referred to coincides with the positionalrelationship with the divided pattern image data 43 a and the dividedpattern image data 43 b and the divided pattern image data 43 c, thusthe extraction accuracy is set to 2/2, that is, the extraction accuracyset to 100%. Thus, even when extraction accuracy is calculated as aratio, it is sufficient that the pattern extracting unit 12 b selects apartial pattern region with a certain degree of extraction accuracy,using a threshold, for example.

4. Summary:

In this way, according to the present exemplary embodiment, the printingapparatus 10 includes the transport unit 16 configured to transport thefabric 30 formed with a pattern in the transport direction D1, theimaging unit 15 configured to image the fabric 30 transported by thetransport unit 16, the printing unit 17 configured to perform printingon the fabric 30 transported by the transport unit 16, the patternextracting unit 12 b configured to, based on a comparison between firstimage data representing the pattern, and second image data generated byimaging the fabric 30 by the imaging unit 15, extract a pattern regioncorresponding to the pattern in the second image data, the printingimage generation unit 12 c configured to arrange third image datarepresenting an image to be printed overlaid on the pattern so that thethird image data matches the pattern region extracted to generateprinting image data, and the printing control unit 12 d configured tocause the printing unit 17 to print the printing image data on thefabric 30. Then, the pattern extracting unit 12 b compares each of aplurality of divided pieces of first image data obtained by dividing thefirst image data in at least one of a vertical direction and ahorizontal direction with the second image data, to extract, from thesecond image data, a partial pattern region corresponding to a partialpattern represented by the divided first image data. The printing imagegeneration unit 12 c arranges each of a plurality of divided pieces ofthird image data obtained by dividing the third image data in at leastone of the vertical direction and the horizontal direction in accordancewith the partial pattern region extracted to generate the printing imagedata.

According to the above configuration, the pattern extracting unit 12 bperforms comparison with the second image data not in units of the firstimage data, but in units of the divided first image data, to extract thepartial pattern region from the second image data. As a result, evenwhen distortion and the like occur in the fabric 30, or a size of thefirst image data is large, effects thereof can be reduced toappropriately extract a partial pattern region, and as a result, apattern region, which is a collection of the partial pattern regions,can be extracted with high precision. In addition, the printing imagegeneration unit 12 c arranges the divided third image data in units ofthe divided third image data so as to correspond to the partial patternregion to generate the printing image data. Therefore, compared to acase where the third image data is arranged in units of the third imagedata so as to match a pattern region to perform printing, a fineadjustment and correction are easy to achieve, and a shift between thepattern and the image to be printed overlaid on the pattern is easilyreduced.

In addition, as can be seen from FIG. 2A, a distance between the imagingunit 15 and the printing head 19 in the transport direction D1 isdetermined according to product standards. The control unit 11, whichhas acquired the second image data generated by the imaging unit 15imaging the fabric 30 being transported, needs to end the generation ofthe printing image data required for starting printing before the fabric30 reaches the printing head 19. However, when each pattern formed inthe fabric 30 is large, and the printing image data is generated afterthe pattern region corresponding to one pattern is extracted from thesecond image data, it is too late to start printing on the fabric 30,thus there is a need to reduce transport velocity of the fabric 30, orto suspend the transport. With respect to such a disadvantage, in thepresent exemplary embodiment, the partial pattern region is extractedfrom the second image data in units of the divided first image data, soas to match the partial pattern region in units of the divided thirdimage data, to generate the printing image data. As a result, theprinting image data can be generated sequentially without waiting oneentire pattern being imaged or an entire pattern region being extracted,and a decrease in printing efficiency can be avoided.

The present exemplary embodiment includes a configuration in which thepattern extracting unit 12 b treats divided first image data obtained bydividing first image data only in a vertical direction, and the printingimage generation unit 12 c treats divided third image data by dividingthird image data only in the vertical direction. Similarly, the presentexemplary embodiment includes a configuration in which the patternextracting unit 12 b treats divided first image data obtained bydividing first image data only in a horizontal direction, and theprinting image generation unit 12 c treats divided third image data bydividing third image data only in the horizontal direction.

Additionally, according to the present exemplary embodiment, the patternextracting unit 12 b, when extracting first partial pattern regioncorresponding to a partial pattern represented by one divided piece offirst image data from a plurality of positions of the second image data,calculates accuracy of extraction, for each of the first partial patternregions at the plurality of positions, based on a comparison between apositional relationship between the first partial pattern region andanother partial pattern region extracted around the first partialpattern region, and a positional relationship among a plurality of thedivided pieces of first image data in the first image data. Then, anextraction result of the first partial pattern region, where theaccuracy is relatively high, among the first partial pattern regions atthe plurality of positions, is provided to the printing image generationunit 12 c for generation of printing image data.

According to the above configuration, the pattern extracting unit 12 b,by calculating the accuracy of extraction, or extraction accuracy, onthe partial pattern region, can eliminate the partial patterned regionthat was erroneously extracted from the second image data by acomparison with the divided first image data, and provide information ofthe partial pattern region extracted correctly for generation ofprinting image data. As a result, for example, generation of printingimage data by combining divided third image data with an erroneousarrangement can be avoided, and printing quality can be ensured.

The present exemplary embodiment also discloses an invention of variouscategories, such as a system, a program, and a method other than theprinting apparatus 10.

A printing method includes a transport step for transporting the fabric30 formed with a pattern in the transport direction D1, an imaging stepfor imaging the fabric 30 transported, a pattern extraction step for,based on a comparison between first image data representing the patternand second image data generated by imaging the fabric 30 to extract apattern region corresponding to the pattern in the second image data, aprinting image generation step for arranging third image datarepresenting an image to be printed overlaid on the pattern so that thethird image data matches the pattern region extracted to generateprinting image data, and a printing step for printing the printing imagedata on the fabric 30 transported. Then, the pattern extraction stepincludes comparing each of a plurality of divided pieces of first imagedata obtained by dividing the first image data in at least one of avertical direction and a horizontal direction with the second imagedata, to extract, from the second image data, a partial pattern regioncorresponding to a partial pattern represented by the divided firstimage data, and the printing image generation step includes arrangingeach of a plurality of divided pieces of third image data obtained bydividing the third image data in at least one of the vertical directionand the horizontal direction so as to match the partial pattern regionextracted to generate the printing image data.

In the example in FIG. 2A, the configuration of a so-called serialprinter has been disclosed in which the printing head 19 is moved whilebeing mounted on the carriage 20, but the printing head 19 may be aso-called line type head. That is, the printing head 19 may be anelongated printing head that is not mounted on the carriage 20 and thatcan cover a width of the fabric 30 along the width direction D2.

In FIGS. 2A and 2B, the configuration denoted by the reference sign 22need not be the endless belt, and may be a platen as a platform thatsupports the fabric 30 from below. That is, it may be understood thatthe fabric 30 transported by a roller (not illustrated) moves over theplaten.

The present exemplary embodiment can also be applied to a case where amaterial other than the fabric 30, for example, a paper printing medium,formed with a pattern is used for printing.

What is claimed is:
 1. A printing apparatus, comprising: a transportunit configured to transport a fabric formed with a pattern in atransport direction; an imaging unit configured to image the fabrictransported by the transport unit; a printing unit configured to performprinting on the fabric transported by the transport unit; a patternextracting unit configured to, based on a comparison between first imagedata representing the pattern and second image data generated by imagingthe fabric by the imaging unit, extract a pattern region correspondingto the pattern in the second image data; a printing image generationunit configured to arrange third image data representing an image to beprinted overlaid on the pattern so that the third image data matches thepattern region extracted, to generate printing image data; and aprinting control unit configured to cause the printing unit to print theprinting image data on the fabric, wherein the pattern extracting unitcompares each of a plurality of divided pieces of first image dataobtained by dividing the first image data in at least one of a verticaldirection and a horizontal direction with the second image data, toextract, from the second image data, a partial pattern regioncorresponding to a partial pattern represented by the divided firstimage data, and the printing image generation unit arranges each of aplurality of divided pieces of third image data obtained by dividing thethird image data in at least one of the vertical direction and thehorizontal direction, in accordance with the partial pattern regionextracted, to generate the printing image data.
 2. The printingapparatus according to claim 1, wherein the pattern extracting unit,when extracting first partial pattern region corresponding to a partialpattern represented by one piece of the divided first image data from aplurality of positions of the second image data, calculates accuracy ofextraction, for each of the first partial pattern regions at theplurality of positions, based on a comparison between a positionalrelationship between the first partial pattern region and anotherpartial pattern region extracted around the first partial patternregion, and a positional relationship among the plurality of dividedpieces of first image data in the first image data, and provides anextraction result of the first partial pattern region, where theaccuracy is relatively high, among the first partial pattern regions atthe plurality of positions to the printing image generation unit forgeneration of the printing image data.
 3. A printing method, comprising:a transport step for transporting a fabric formed with a pattern in atransport direction; an imaging step for imaging the fabric transported;a pattern extraction step for, based on a comparison between first imagedata representing the pattern and second image data generated by imagingthe fabric, extracting a pattern region corresponding to the pattern inthe second image data; a printing image generation step for arrangingthird image data representing an image to be printed overlaid on thepattern so that the third image data matches the pattern regionextracted, to generate printing image data; and a printing step forprinting the printing image data on the fabric transported, wherein thepattern extraction step includes comparing each of a plurality ofdivided pieces of first image data obtained by dividing the first imagedata in at least one of a vertical direction and a horizontal directionwith the second image data, to extract, from the second image data, apartial pattern region corresponding to a partial pattern represented bythe divided first image data, and the printing image generation stepincludes arranging each of a plurality of divided pieces of third imagedata, obtained by dividing the third image data in at least one of thevertical direction and the horizontal direction, in accordance with thepartial pattern region extracted, to generate the printing image data.